import { Router } from 'hyper-express';
import requireUser from '../../../middlewares/auth/requireUser';
import cache from '../../../middlewares/cache';
import rowLevelPermission from '../../../middlewares/auth/rowLevelPermission';
//#region AutoCreateCode
import { uctooLinkTagController } from '../../../controllers';
const uctoolinkTagRouter = new Router();
const linkTagController = new uctooLinkTagController();

uctoolinkTagRouter.post('/add', requireUser, linkTagController.add);
uctoolinkTagRouter.post('/edit', requireUser, rowLevelPermission('uctoo/link_tag'), linkTagController.edit);
uctoolinkTagRouter.post('/del', requireUser, rowLevelPermission('uctoo/link_tag'), linkTagController.delete);

//For getting linkTag with permission control
uctoolinkTagRouter.get('/:id', requireUser,  rowLevelPermission('uctoo/link_tag'), linkTagController.getSingle);
uctoolinkTagRouter.get('/:limit/:page', requireUser,  rowLevelPermission('uctoo/link_tag'), linkTagController.getMany);
uctoolinkTagRouter.get('/:limit/:page/:skip', requireUser,  rowLevelPermission('uctoo/link_tag'), linkTagController.getMany);

//#endregion AutoCreateCode
export default uctoolinkTagRouter;
